import request from '@/utils/request'



// 获取权限列表
export function getPermissionList() {
    return request({
        url: '/permission/list',
        method: 'get'
    })
}

export function deleteByPermissionId(id) {
    return request({
        url: `/permission/${id}`,
        method: 'delete',
    })
}

export function addPermission(per) {
    return request({
        url: '/permission/addPermission',
        method: 'post',
        data: per
    })
}

export function getByPermissionId(id) {
    return request({
        url: `/permission/${id}`,
        method: 'get',
    })
}

export function updatePermission(per) {
    return request({
        url: '/permission/updatePermission',
        method: 'put',
        data: per
    })
}